#ifndef __identist__GAMELAYER__
#define __identist__GAMELAYER__

#include "cocos2d.h"
#include "Auger.h"
#include "Brush.h"
#include "Fix.h"
#include "Hook.h"
#include "Pliers.h"
#include "Polish.h"
#include "OneTooth.h"
#include "TwoTooth.h"
#include "ThreeTooth.h"
#include "FourTooth.h"
#include "FiveTooth.h"
#include "SixTooth.h"
#include "SevenTooth.h"
#include "EightTooth.h"
#include "NineTooth.h"
#include "TenTooth.h"
#include "ElevenTooth.h"
#include "TwelveTooth.h"
#include "cocos-ext.h"
using namespace extension;

USING_NS_CC;

class GameLayer:public CCLayer
{
Auger *_auger;
Brush *_brush;
Fix *_fix;
Hook *_hook;
Pliers *_pliers;
Polish *_polish;
OneTooth *_oneTooth;
TwoTooth *_twoTooth;
ThreeTooth *_threeTooth;
FourTooth *_fourTooth;
FiveTooth *_fiveTooth;
SixTooth *_sixTooth;
SevenTooth *_sevenTooth;
EightTooth *_eightTooth;
NineTooth *_nineTooth;
TenTooth *_tenTooth;
ElevenTooth *_elevenTooth;
TwelveTooth *_twelveTooth;

public:
    CREATE_FUNC(GameLayer);
    
    GameLayer(void);
	~GameLayer(void);
    
    //level
    bool init();
    std::string* bigLevel;
    std::string* littleLevel;
    cocos2d::extension::CCArmature *armature;
    
    //ready for bad tooth create
    int badToothCount;
    int randint(int l,int u);
    std::set<int> gen(int n, int m);
    std::set<int> badToothA;
    std::set<int> badToothB;
    std::set<std::string> badToothC;
    
    //add bad tooth
    bool checkSet;
    void addBadTooth(int x);
    cocos2d::CCArray *_augerTooth;
    cocos2d::CCArray *_brushTooth;
    cocos2d::CCArray *_fixTooth;
    cocos2d::CCArray *_hookTooth;
    cocos2d::CCArray *_pliersTooth;
    cocos2d::CCArray *_polishTooth;
    
    //fix params
	int op;
    int fixSpeed;
    int fixNum = 0;
    CCSprite* objectTooth;
    
    //time and count params
    int testnum;
    int mins;
    int secs;
    std::string minStr;
    std::string secStr;
    CCLabelAtlas *labelAtlas;
    CCLabelAtlas *hourLabelAtlas;
    CCLabelAtlas *minLabelAtlas;
    void minTimer(float dt);

    virtual void update(float dt);
    
    CCLayer *resaultLayer;
};
#endif
